// Decompiled by DJ v3.9.9.91 Copyright 2005 Atanas Neshkov  Date: 2009-10-26 21:57:27


// Source File Name:   LocalVariable.java

package com.vhly.classfile;

import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;

public class LocalVariable {

    private int start_pc;
    private int length;
    private int name_index;
    private int sig_index;
    private int index;

    public LocalVariable() {
        start_pc = 0;
        length = 0;
        name_index = 0;
        sig_index = 0;
        index = 0;
    }

    public LocalVariable(int i, int j, int k, int l, int i1) {
        start_pc = i;
        length = j;
        name_index = k;
        sig_index = l;
        index = i1;
    }

    public void write(DataOutputStream dataoutputstream)
            throws IOException {
        dataoutputstream.writeShort(start_pc);
        dataoutputstream.writeShort(length);
        dataoutputstream.writeShort(name_index);
        dataoutputstream.writeShort(sig_index);
        dataoutputstream.writeShort(index);
    }

    public void read(DataInputStream datainputstream)
            throws IOException {
        start_pc = datainputstream.readUnsignedShort();
        length = datainputstream.readUnsignedShort();
        name_index = datainputstream.readUnsignedShort();
        sig_index = datainputstream.readUnsignedShort();
        index = datainputstream.readUnsignedShort();
    }

    public int getLength() {
        return length;
    }

    public int getNameIndex() {
        return name_index;
    }

    public int getSignatureIndex() {
        return sig_index;
    }

    public int getIndex() {
        return index;
    }

    public int getStartPC() {
        return start_pc;
    }

    public void setLength(int i) {
        length = i;
    }

    public void setNameIndex(int i) {
        name_index = i;
    }

    public void setSigIndex(int i) {
        sig_index = i;
    }

    public void setIndex(int i) {
        index = i;
    }

    public void setStartPC(int i) {
        start_pc = i;
    }
}